﻿using ETA.DomainEnum;
using ETA.Entity;
using FluentNHibernate.Mapping;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ETA.EntityMappings
{
    public class AskForHelpMap : ClassMap<AskForHelp>
    {
        public AskForHelpMap()
        {
            Id(x => x.AskForHelpId);
            Map(x => x.ModifyDate);
            Map(x=>x.CreateDate);
            Map(x=>x.IsDelete);
            Map(x => x.AskForHelpContent);
            Map(x => x.AskForHelpKindEnum).CustomType<AskForHelpKindEnum>().Column("AskForHelpKind");
            Map(x => x.AskForHelpTypeEnum).CustomType<AskForHelpTypeEnum>().Column("AskForHelpType");
            Map(x => x.StateEnum).CustomType<StateEnum>().Column("State");
            Map(x => x.EvaluateEnum).CustomType<EvaluateEnum>().Column("Evaluate");
            References(x => x.SubmitUser).Column("UserId")
          .Cascade.All();
        }
    }
}
